<?php
	require_once 'db-connection.php';

	if(isset($_POST['submit'])) {
		require_once 'datePicker.php';
		$username = $_POST['username'];
		$password = sha1($_POST['password']);
		$email = $_POST['email'];
		$birthDate = manageDate('birth_date');
		$user = new User($username, $password, $birthDate, $email);
		
		$dbConnection->registerUser($user);		
	}
?>